# Makefile for windows WinUSB based examples
BTSTACK_ROOT ?= ../..

CORE += btstack_stdin_windows.c btstack_chipset_csr.c

COMMON  += hci_transport_h2_winusb.c btstack_run_loop_windows.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c
COMMON  += btstack_chipset_intel_firmware.c rijndael.c att_db_util.c

include ${BTSTACK_ROOT}/example/Makefile.inc

CFLAGS  += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpedantic

CFLAGS += -I${BTSTACK_ROOT}/port/windows-winusb \
		  -I${BTSTACK_ROOT}/platform/windows \
		  -I${BTSTACK_ROOT}/platform/posix \
		  -I${BTSTACK_ROOT}/chipset/intel \
		  -I${BTSTACK_ROOT}/platform/embedded \
          -I${BTSTACK_ROOT}/3rd-party/rijndael \
          -I${BTSTACK_ROOT}/3rd-party/tinydir

VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael

VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/windows
VPATH += ${BTSTACK_ROOT}/chipset/csr
VPATH += ${BTSTACK_ROOT}/chipset/intel

LDFLAGS += -lsetupapi -lwinusb

all: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_CLIENT_OBJ} ${GATT_SERVER_OBJ} ${CLASSIC_OBJ} ${MESH_OBJ}
	${AR} rc libbtstack.a $^
	strip --strip-unneeded libbtstack.a
